// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PagingResult.java

package com.sgame.android.social;

import org.json.JSONException;
import org.json.JSONObject;

public final class PagingResult
{

    public PagingResult()
    {
        start = 0;
        count = 0;
        total = 0;
    }

    public void PagingResultFromValues(int start, int count, int total)
    {
        this.start = start;
        this.count = count;
        this.total = total;
    }

    public static PagingResult createFromJson(JSONObject json)
    {
        PagingResult result = new PagingResult();
        result.setFromJson(json);
        return result;
    }

    public void setFromJson(JSONObject json)
    {
        start = json.optInt("start");
        count = json.optInt("count");
        total = json.optInt("total");
    }

    public JSONObject toJsonObject()
    {
        JSONObject object = new JSONObject();
        try
        {
            object.put("start", start);
            object.put("count", count);
            object.put("total", total);
        }
        catch(JSONException e)
        {
            e.printStackTrace();
        }
        return object;
    }

    public int start;
    public int count;
    public int total;
}
